Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split clickhouse admin server #6837

Merged
merged 10 commits into from
Oct 12, 2024
Merged

Conversation

andrewjstone
Copy link
Contributor

Fixes #6779
Fixes #6829

Also, split the clients and remove the dependency
of clickhouse-admin-api from nexus.
@andrewjstone
Copy link
Contributor Author

I'm pretty sure I have to fix some omicron-pkg and smf stuff here as well. I'll do that shortly.

Copy link
Contributor

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments

clickhouse-admin/api/src/lib.rs Show resolved Hide resolved
clickhouse-admin/types/src/lib.rs Show resolved Hide resolved
clients/clickhouse-admin-keeper-client/src/lib.rs Outdated Show resolved Hide resolved
dev-tools/ls-apis/src/system_apis.rs Show resolved Hide resolved
dev-tools/openapi-manager/src/spec.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The new SMF definition looks very similar to the existing keeper one so I'll presume it's okay. Everything else looks pretty mechanical. Thanks!


/// We separate the admin interface for the keeper and server APIs because they
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First paragraph of doc comments should be short (a lint for this is coming in Rust 1.83.) Could you just add something simple?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip! Done in 0a2e28b

@@ -95,3 +77,28 @@ pub trait ClickhouseAdminApi {
rqctx: RequestContext<Self::Context>,
) -> Result<HttpResponseOk<ClickhouseKeeperClusterMembership>, HttpError>;
}

/// We separate the admin interface for the keeper and server APIs because they
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 0a2e28b

@@ -17,7 +17,7 @@
</dependency>

<exec_method type='method' name='start'
exec='ctrun -l child -o noorphan,regent /opt/oxide/clickhouse-admin/bin/clickhouse-admin run -c /var/svc/manifest/site/clickhouse-admin/config.toml -a %{config/http_address} -l %{config/ch_address} -b %{config/ch_binary} &amp;'
exec='ctrun -l child -o noorphan,regent /opt/oxide/clickhouse-admin-keeper/bin/clickhouse-admin-keeper run -c /var/svc/manifest/site/clickhouse-admin-keeper/config.toml -a %{config/http_address} -l %{config/ch_address} -b %{config/ch_binary} &amp;'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could I ask you to use the long version of command arguments here? ^_^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 0a2e28b

</dependency>

<exec_method type='method' name='start'
exec='ctrun -l child -o noorphan,regent /opt/oxide/clickhouse-admin-server/bin/clickhouse-admin-server run -c /var/svc/manifest/site/clickhouse-admin-server/config.toml -a %{config/http_address} -l %{config/ch_address} -b %{config/ch_binary} &amp;'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 0a2e28b

@andrewjstone
Copy link
Contributor Author

Thanks for the great review @sunshowers!

@andrewjstone andrewjstone enabled auto-merge (squash) October 11, 2024 23:57
@andrewjstone andrewjstone merged commit e634215 into main Oct 12, 2024
19 checks passed
@andrewjstone andrewjstone deleted the split-clickhouse-admin-server branch October 12, 2024 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants